package;

import flash.Lib;
import flixel.FlxGame;
	
class ProjectClass extends FlxGame
{	
	private static inline var CanvasWidth: Int = 320;
	private static inline var CanvasHeight: Int = 240;

	public function new()
	{
		var stageWidth:Int = Lib.current.stage.stageWidth;
		var stageHeight:Int = Lib.current.stage.stageHeight;
		var ratioX:Float = stageWidth / CanvasWidth;
		var ratioY:Float = stageHeight / CanvasHeight;
		var ratio:Float = Math.min(ratioX, ratioY);
		Reg.init();
		Reg.useSaveSlot("0");
		//Reg.slotWipeData();
		if(Reg.slotHasData())
		{
			Reg.load();
		}
		else
		{
			Reg.slotLoadDefault();
		}
		super(Math.ceil(stageWidth / ratio), Math.ceil(stageHeight / ratio), PlayState, ratio, 30, 30);
	}
}
